<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="my" uri="http://mytag.wangwang.com/jsp/jstl/tags"%>
<div class="page-content">
	<div class="row">
		<div class="col-sm-9">
			<form id='playerQueryFOrm'  class="form-inline">
				<div class="input-group">
					<input value="${queryStr }" type="text" name="queryStr" class="form-control search-query" placeholder="输入ID或昵称">
				</div>
				<div class="input-group" style="">	
					<select name="memberOrder"  >
						<option value=''></option>
						<option <c:if test="${memberOrder == 0}">selected</c:if> value='0'>普通</option>
						<option <c:if test="${memberOrder == 1}">selected</c:if> value='1'>vip</option>
					</select>
				</div>
				<div class="input-group input-daterange"  style="width: 60%">
					<input id="queryInputAgentId" type="hidden" value="${agentId }" name="agentId" />
					<span class="input-group-btn">
						<button type="button" class="btn btn-purple btn-sm" onclick="refreshPage()">
							<span class="ace-icon fa fa-search icon-on-right bigger-110"></span>
							查询
						</button>
					</span>
				</div>
			</form>
		</div>
	</div>

	<div class="col-xs-12" style="margin-top:5px;">
		<table id="simple-table" class="table table-bordered table-hover">
			<thead>
				<tr>
					<th class="center">
						<label class="pos-rel">
							<input type="checkbox" class="ace">
							<span class="lbl"></span>
						</label>
					</th>
					<th class="center">序号</th>
					<th class="center">用户头像</th>
					<th class="center">ID</th>
					<th class="center">用户昵称</th>
					<th class="center">邀请人</th>
					<th class="center">运营号</th>
					<th class="center">分数</th>
					<th class="center">状态</th>
					<th class="center">总入库</th>
					<th class="center"><i class="ace-icon fa fa-clock-o bigger-110 hidden-480">登录时间</i></th>
					<th class="center">操作</th>
				</tr>
			</thead>
			
			<tbody>
				<c:forEach items="${data}" var="itm" varStatus="i">  
			       <tr>
						<td class="center">
							<label class="pos-rel">
								<input type="checkbox" class="ace">
								<span class="lbl"></span>
							</label>
						</td>
			
						<td class="center">
							${i.index + 1}
						</td>
						<td class="center">
							<img width=50 height=50 src="${itm.userImg }" onerror="onerror=null;src='https://res.wx.qq.com/a/wx_fed/common_assets/16120602/win_weixin21/images/phone_logo2x.png'" />
						</td>
						<td class="center">${itm.userId }</td>
						<td class="center">${itm.nickName }</td>
						<td class="center">
							${itm.fatherAgentId }
							<c:if test="${not empty itm.fatherNickName }">
								(${itm.fatherNickName })
							</c:if>
						</td>
						<td class="center">
							${itm.topId} 
							<c:if test="${not empty itm.topName}">
								(${itm.topName }) 
							</c:if>
						</td>
			
						<td class="center">
							${itm.goldCoinCount }
						</td>
						<td class="center">
						
						<c:set var="checked" value="checked=checked" />
						<c:if test="${itm.status == 0}">
						<c:set var="checked" value="" />
						</c:if>
						<label>
							<input name="switch-field-1"  onclick="return false;" class="ace ace-switch ace-switch-3" type="checkbox" ${checked }>
							<span class="lbl" style='cursor:auto;'></span>
						</label>
						</td>
						<td class="center">${itm.amt }</td>
						<td class="center">${itm.loginTime }</td>
						<td class="center">
							<c:if test="${itm.memberOrder==0}" >
								<a class="btn btn-xs btn-danger" title="设置" onclick="setVip(${itm.userId},1)">
									设置
								</a>
							</c:if>
							<c:if test="${itm.memberOrder==1}" >
								<a class="btn btn-xs btn-danger" title="取消" onclick="setVip(${itm.userId},0)">
									取消
								</a>
							</c:if>
						</td>
					</tr>
			    </c:forEach>  
					
				</tbody>
			</table>
			<%@include file="../paging.jsp" %>
	</div>
</div>
